package com.lagou.edu.model;

import java.util.List;

public class PageInfo<T> {

    private int page = 1;

    private int size = 10;

    private int total = 0;

    private int pages = 0;

    private List<T> data;

    private boolean isSearchCount = true;

    public PageInfo(int page, int size, boolean isSearchCount) {
        this.page = page;
        this.size = size;
        this.isSearchCount = isSearchCount;
    }

    public PageInfo(int page, int size) {
        this(page, size, true);
        this.page = page;
        this.size = size;
    }

    public PageInfo() {
    }

    public boolean isSearchCount() {
        return isSearchCount;
    }

    public void setSearchCount(boolean searchCount) {
        isSearchCount = searchCount;
    }

    public int getPage() {
        return page;
    }

    public void setPage(int page) {
        this.page = page;
    }

    public int getSize() {
        return size;
    }

    public void setSize(int size) {
        this.size = size;
    }

    public int getTotal() {
        return total;
    }

    public void setTotal(int total) {
        this.total = total;
    }

    public int getPages() {
        return pages;
    }

    public void setPages(int pages) {
        this.pages = pages;
    }

    public List<T> getData() {
        return data;
    }

    public void setData(List<T> data) {
        this.data = data;
    }
}
